xl: Remove global domid and enable -Wshadow
authorIan Campbell <ian.campbell@citrix.com>
Mon, 17 Sep 2012 10:17:02 +0000 (11:17 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 17 Sep 2012 10:17:02 +0000 (11:17 +0100)
commita73a7a0c647a9a5e30d8bc473c0a1e8648817183
tree60df841ab6f883779a94f5a91a0e2fdfe51a3f2a
parentead2225b33dec11a4c1f638074508581df57ceab
xl: Remove global domid and enable -Wshadow

Lots of functions loop over a list of domain and others take a domid as
a parameter, shadowing the global one and leading to all sorts of
confusion.

Therefore remove the global domid and explicitly pass it around as
necessary.

Adds a domid to the parameters for many functions and switches many
others from taking a char * domain specifier to taking a domid, pushing
the domid lookup to the toplevel.

Replaces some open-coded domain_qualifier_to_domid error checking with
find_domain.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
[ ijc -- annotate find_domain() with warn_unused_result and fix the
         handful of errors. ]
Committed-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/Makefile
tools/libxl/xl_cmdimpl.c